package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * 活动的具体描述
 * @author huangxin
 *
 */
@MappedSuperclass
public class AbstractADetail {

	private int id;
	private Activity activity;
	private String aKind;	//活动类型：活动标签的集合
	private int num;	//活动人数：活动目标人数
	private int aProperty;	//活动属性：个人or活动群
	private String applyMess;	//报名信息
	private String emai;
	private String cIds;	//联系人：所有联系人ID的结合，以“-”连接
	private int agreeNum;	//同意人数：对于邀请人
	private int refuseNum;	//拒绝人数：对于邀请人
	private int undetNum;	//待定人数：对于邀请人
	private int applyNum;	//申请人数：对于未被邀请人
	
	public AbstractADetail(int id, Activity activity, String aKind, int num,
			int aProperty, String applyMess, String emai, String cIds,
			int agreeNum, int refuseNum, int undetNum, int applyNum) {
		super();
		this.id = id;
		this.activity = activity;
		this.aKind = aKind;
		this.num = num;
		this.aProperty = aProperty;
		this.applyMess = applyMess;
		this.emai = emai;
		this.cIds = cIds;
		this.agreeNum = agreeNum;
		this.refuseNum = refuseNum;
		this.undetNum = undetNum;
		this.applyNum = applyNum;
	}
	
	public AbstractADetail() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Id 
	@GeneratedValue(strategy=IDENTITY)	    
	@Column(name="ID", unique=true, nullable=false)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AID", nullable = true)
	public Activity getActivity() {
		return activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	@Column(name="AKIND", nullable=true, length=100)
	public String getaKind() {
		return aKind;
	}

	public void setaKind(String aKind) {
		this.aKind = aKind;
	}

	@Column(name="NUM", nullable=true)
	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	@Column(name="APROPERTY", nullable=true)
	public int getaProperty() {
		return aProperty;
	}

	public void setaProperty(int aProperty) {
		this.aProperty = aProperty;
	}

	@Column(name="APPLYMESS", nullable=true, length=100)
	public String getApplyMess() {
		return applyMess;
	}

	public void setApplyMess(String applyMess) {
		this.applyMess = applyMess;
	}

	@Column(name="EMAIL", nullable=true, length=30)
	public String getEmai() {
		return emai;
	}

	public void setEmai(String emai) {
		this.emai = emai;
	}

	@Column(name="CIDS", nullable=true, length=100)
	public String getcIds() {
		return cIds;
	}

	public void setcIds(String cIds) {
		this.cIds = cIds;
	}

	@Column(name="AGREENUM", nullable=true)
	public int getAgreeNum() {
		return agreeNum;
	}

	public void setAgreeNum(int agreeNum) {
		this.agreeNum = agreeNum;
	}

	@Column(name="REFUSENUM", nullable=true)
	public int getRefuseNum() {
		return refuseNum;
	}

	public void setRefuseNum(int refuseNum) {
		this.refuseNum = refuseNum;
	}

	@Column(name="UNDETNUM", nullable=true)
	public int getUndetNum() {
		return undetNum;
	}

	public void setUndetNum(int undetNum) {
		this.undetNum = undetNum;
	}

	@Column(name="APPLYNUM", nullable=true)
	public int getApplyNum() {
		return applyNum;
	}

	public void setApplyNum(int applyNum) {
		this.applyNum = applyNum;
	}

	@Override
	public String toString() {
		return "AbstractADetail [id=" + id + ", activity=" + activity
				+ ", aKind=" + aKind + ", num=" + num + ", aProperty="
				+ aProperty + ", applyMess=" + applyMess + ", emai=" + emai
				+ ", cIds=" + cIds + ", agreeNum=" + agreeNum + ", refuseNum="
				+ refuseNum + ", undetNum=" + undetNum + ", applyNum="
				+ applyNum + "]";
	}
	
	
	
	
}
